Repository navigation
Conversation
Scrolling through a long output took many swipes. SwiftTerm moves the scrollback with the fingers, pixel for pixel, and a notch of the mouse wheel moves one line. Codec now multiplies that, through SwiftTerm's scrollSensitivity, by a new setting: Settings › Shell › Scrolling, from 1× (SwiftTerm's own rate) to 5× in half steps, 2× by default. It applies to every pane as soon as it changes, and in full-screen programs such as vim and less too, since SwiftTerm scales the wheel before deciding where it goes. A test sends real wheel events to a pane and checks that a notch moves two lines by default and four at 4×; the preferences tests cover the default, keeping a change and repairing a value out of range. Closes #24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #24. The trackpad and the mouse wheel now scroll twice as far as before, and Settings › Shell › Scrolling sets how far: from 1×, SwiftTerm's own rate, to 5×, in half steps.
Why it was slow
SwiftTerm moves the scrollback with the fingers, pixel for pixel (trackpad deltas divided by the row height, the remainder kept for the next event), and a notch of the mouse wheel moves one line. That feels natural over a page but takes many swipes through a long output. SwiftTerm already scales the wheel by
scrollSensitivity; nothing set it.Summary
settings.mdandcommand-line.md.Tests
PaneTests.aWheelNotchScrollsAsFarAsTheSettingSayssends real line-unit wheel events to a pane in a window: a notch moves 2 lines by default, 4 at 4×.PreferencesTestscover the default, keeping a change, and repairing a value out of range.🤖 Generated with Claude Code